angular.module('department',['dept.controllers'])
.config(function($stateProvider) {
  $stateProvider

    //部门/店铺管理
    .state('app.departments', {
      url: 'departments',
      views: {
        'menuContent': {
          templateUrl: 'templates/department/list.html',
          controller: 'DeptsCtrl'
        }
      }
    })
    .state('app.dept-add', {
      url: 'add-department?parent_id',
      views: {
        'menuContent': {
          templateUrl: 'templates/department/add.html',
          controller: 'DeptAddCtrl'
        }
      }
    })
      //部门/店铺详情，编辑
      .state('app.department', {
        url: 'department-:_id',
        views: {
          'menuContent': {
            templateUrl: 'templates/department/detail.html',
            controller: 'DeptDetailCtrl'
          }
        }
      })

    //仓库管理
    .state('app.warehouses', {
      url: 'warehouses',
      views: {
        'menuContent': {
          templateUrl: 'templates/base/warehouses.html',
          controller: 'WarehousesCtrl'
        }
      }
    })
      //仓库详情，编辑
      .state('app.warehouse', {
        url: 'warehouse-:_id',
        views: {
          'menuContent': {
            templateUrl: 'templates/base/warehouse.html',
            controller: 'WarehouseDetailCtrl'
          }
        }
      });
});